package com.ld.security.tool.base.entity;

import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.core.base.po.SuperPo;
import com.ld.security.common.mybatis.constant.SqlCondition;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Document(indexName = "sea_sontent", type = "sea_sontent")
@Data
public class SeaContent implements SuperPo {


    @Id
    @Field( type = FieldType.Keyword)
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("编号")
    private String id;

    @Field( type = FieldType.Keyword)
    @ApiModelProperty("封面")
    private String picture;

    @Field( type = FieldType.Integer)
    @ApiModelProperty("价格")
    private Integer price;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    @SqlKey(SqlCondition.like)
    @ApiModelProperty("标题")
    private String title;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    @SqlKey(SqlCondition.like)
    @ApiModelProperty("内容")
    private String content;

    @Field(type = FieldType.Keyword)
    @SqlKey(SqlCondition.like_right)
    @ApiModelProperty("类型")
    private String seaType;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    @SqlKey(SqlCondition.like)
    @ApiModelProperty("标签")
    private String tags;

    @Field(type = FieldType.Date)
    @SqlKey(SqlCondition.ge)
    @ApiModelProperty("创建时间")
    private Date crtTime;

    @Field(type = FieldType.Date)
    @SqlKey(SqlCondition.le)
    @ApiModelProperty("修改时间")
    private Date uptTime;

    @SqlKey(SqlCondition.eq)
    @Field( type = FieldType.Keyword)
    @ApiModelProperty("创建人")
    private String crtUser;


}
